package com.demo.controller;

import com.demo.config.*;
import org.springframework.boot.SpringApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @see EnableWebMvc
 * @see DelegatingWebMvcConfiguration
 * @see WebMvcConfigurer 从spring 5.0开始，因为支持java 8的接口默认方法，所以不需要{@code WebMvcConfigurerAdapter}帮助配置spring mvc
 */
@ZhengCustomApplication
@EnableMagicProperties(ServerProperties.class)
public class SpringBootDemoApplication {

    public static void main(String[] args) {
        // 默认实例化应用程序主类(main())成为Bean，因为主类上有@Configuration注解，spring容器把本类作为配置类处理。
        SpringApplication.run(SpringBootDemoApplication.class, args);
    }
}
